import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';

toast(String msg, {AlignmentGeometry align}) {
  BotToast.showText(
    text: msg ?? '',
    align: align ?? Alignment.topCenter,
    contentColor: Colors.black87,
  );
}

toastCenter(String msg) {
  BotToast.showText(
    text: msg ?? '',
    align: Alignment.center,
    contentColor: Colors.black87,
  );
}

toastBottom(String msg) {
  BotToast.showText(
    text: msg ?? '',
    textStyle: TextStyle(fontSize: 14,color: Colors.black),
    align: Alignment(0, 0.8),
    contentColor: Colors.white,
  );
}

error(String msg, {AlignmentGeometry align}) {
  BotToast.showText(
    text: msg ?? '',
    textStyle: TextStyle(color: Color(0xfffaf8f8)),
    align: align ?? Alignment.topCenter,
    contentColor: Color(0xfff56c6c),
  );
}

success(String msg, {AlignmentGeometry align}) {
  BotToast.showText(
    text: msg ?? '',
    textStyle: TextStyle(color: Color(0xff50a126)),
    align: align ?? Alignment.topCenter,
    contentColor: Color(0xffe9fae2),
  );
}

warning(String msg, {AlignmentGeometry align}) {
  BotToast.showText(
    text: msg ?? '',
    textStyle: TextStyle(color: Colors.white),
    align: align ?? Alignment.topCenter,
    contentColor: Color( 0xffe08804),
  );
}
